﻿@inherits AdminCompontentBase

<SAutoComplete Small TItem="UserSelectModel"
               TValue="Guid?"
               TItemValue="Guid"
               Value="Value"
               ValueChanged=ValueChanged
               Items="Items"
               OnSearchInputUpdate="OnSearchChanged"
               HideDetails="@("auto")"
               BackgroundColor="white"
                  Clearable
               ItemText="u=>TextView(u)"
               ItemValue="u=>u.Id"
               Filter="(item,search,value) => true"
               Label="@Label"
               Class="@($"{Class} rounded-2")"
               Placeholder="@Placeholder"
               OnClearClick="OnClearClick"
               OnSelectedItemUpdate="OnSelectedItemUpdate">
    <ItemContent Context="data">
        @RenderFragments.UserSelectItem(data.Item.Avatar, data.Item.DisplayName, data.Item.Name, data.Item.PhoneNumber, data.Item.Email)
    </ItemContent>
</SAutoComplete>